package com.gcxy.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.gcxy.conf.result.PageDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author QingYuQiao
 * @date 2023/12/19  9:23
 */
@Data
@Builder
public class PenDTO extends PageDTO implements Serializable {

    @ApiModelProperty(value = "唯一,牧场名称")
//    @NotNull(message = "牧场名称不能为空")
    @Length(max = 100 , message = "牧场名称不能超过100个字符")
    private String ranchName;

    @ApiModelProperty(value = "圈舍名称（同牧场下唯一）")
    private String penName;

    @ApiModelProperty(value = "存栏量")
    private Integer amountLivestock;

    @TableLogic
    @ApiModelProperty(value = "是否启用(1:启用，0:停用)")
    private Integer isEnable;

//    @ApiModelProperty(value = "创建时间")
//    @TableField(fill = FieldFill.INSERT)
//    private Date createTime;
//
//    @TableField(fill = FieldFill.INSERT_UPDATE)
//    @ApiModelProperty(value = "更新时间")
//    private Date updateTime;

}
